The present invention relates to image decoding methods, image decoding apparatus and data storage media and, more particularly, to decoding control or display control which enables to avoid disturbances in a display image immediately after the initiation of decoding even when a lead frame to be decoded is a frame which refers to decoded image data of other frames in the decoding process.
In order to efficiently store or transmit digital image information (hereinafter also referred to as image data), it is required to compressively code the digital image information. In the present circumstances, as methods for compressing the digital image information, there are a Discrete Cosine Transform (DCT) which is typified by compression/decompression processes compliant with standards such as JPEG (Joint Photographic Coding Experts Group) and MPEG (Moving Picture Experts Group), as well as waveform coding methods such as a subband system, a wavelet system, and a fractal system. In the MPEG-standard-compliant compression process, an image of each frame (screen) is divided into square regions (unit regions of a coding process) called macroblocks each being composed of 16xc3x9716 pixels, the macroblock is further divided into subblocks each being composed of 8xc3x978 pixels, and then the digital image information corresponding to the image of each frame is subjected to the DCT process for each subblock. According to this DCT process, a DCT coefficient corresponding to the subblock is obtained.
As an example of methods for removing redundant image information between adjacent frames (images) to carry out the coding, there is a coding method which includes an inter-frame prediction process using motion compensation. In this coding method, initially by the inter-frame prediction process, image data of a predetermined macroblock on the current screen (processing target frame which is to be processed) are predicted with referring to image data of the previous screen (already processed frame), to generate predicted data corresponding to the predetermined macroblock. To be more specific, in the inter-frame prediction process, a reference region in the already processed frame (reference frame) is specified by a motion vector for the target macroblock to be processed in the processing target frame, and predicted data corresponding to the image data of the target macroblock are generated by a motion compensation process by which the image data of the specified reference region are referred to. Then, the image data of the predetermined macroblock are represented by differential data between the image data and the predicted data, and the differential data are waveform-coded as the image data of the predetermined macroblock.
Here, a macroblock whose image data have been coded by the coding method including the inter-frame prediction process (inter-frame predictive coding process) is referred to as an inter-macroblock. A macroblock whose image data have been coded by a coding method which does not include the inter-frame prediction process (intra-frame coding process) is referred to as an intra-macroblock. Further, an inter-frame-coded frame including an inter-macroblock is called P frame (predictive-coded frame) or P picture, and an intra-frame-coded frame which is composed of only intra-macroblocks is called I frame (intra-coded frame) or I picture. In the coding process for a P frame of MPEG, it can be selected for each macroblock whether a macroblock is handled as an inter-macroblock or intra-macroblock.
In MPEG-4 according to which image information can be processed in units of images having arbitrary shapes (hereinafter, referred to as objects) constituting one scene, a rectangular region encompassing the objects is handled as the frame (screen). This rectangular region is referred to a bounding box (BBOX), and it is a region having a width corresponding to the width of the object and a height corresponding to the height of the object. The numbers of pixels in the rectangular region in the width direction (horizontal direction) and the height direction (vertical direction) are multiples of 16, respectively. This is because the rectangular region is composed of plural macroblocks.
In MPEG-4, as the motion compensation process, non-restrictive motion compensation is permitted in which a motion vector for a target macroblock designates a region outside an already processed rectangular region as a reference region. In this case, as the pixel value of the designated reference region, the pixel value of a pixel in the already processed rectangular region, which is the nearest to the reference region, is used.
FIGS. 13(a)xcx9c13(c) are schematic diagrams for explaining the inter-frame prediction process using the non-restrictive motion compensation. Though the above-mentioned rectangular region (BBOX) has sizes which vary with variations in the object shape, assume in the description below that the size of the rectangular region (BBOX) is fixed to the maximum size (4xc3x974 macroblocks in this case) shown in FIG. 13(a).
FIG. 13(b) shows a manner in which an arbitrary-shaped object (flying body) moves from the upper right of the rectangular region toward the lower left with the lapse of time.
In a rectangular region Bx1 for which the processing time (t=t1) is set, only a forward part of the flying body Ob appears. In a rectangular region Bx2 for which the processing time (t=t2, provided that t2 greater than t1) is set, the major portion of the flying body Ob except its tail appears. In a rectangular region Bx3 for which the processing time (t=t3, provided that t3 greater than t2) is set, the whole of the flying body Ob appears.
In the inter-frame predictive coding process for the rectangular region Bx2, the already processed rectangular region Bx1 is used as the reference rectangular region. For example, in the inter-frame predictive coding process taking a macroblock MBa in the rectangular region Bx2 as an inter-macroblock, a region Rra composed of 16xc3x9716 pixels in the rectangular region Bx1 is designated as the reference region by a motion vector corresponding to the macroblock MBa, and the image data (pixel values) of the reference region Rra are used as predicted data of the macroblock MBa. On the other hand, in the inter-frame predictive coding process taking a macroblock MBb in the rectangular region Bx2 as an inter-macroblock, a region Rrb composed of 16xc3x9716 pixels outside the rectangular region Bx1 is designated as the reference region by the motion vector corresponding to the macroblock MBa. In this case, since the image data (pixel values) of the reference region Rrb are not defined, the pixel value of a pixel Pfr in a macroblock Rmb in the rectangular region Bx1, which is at the nearest position to the region Rrb, is taken for each of the pixel values of all pixels Prr in the region Rrb as shown in FIG. 13(c), and image data which are composed of only the pixel values of the pixel Pfr are used as the predicted data of the macroblock MBb.
Hereinafter, the prior art image decoding apparatus will be specifically described.
FIG. 14 is a block diagram for explaining an example of the prior art image decoding apparatus.
This image decoding apparatus 100 receives coded image data which are obtained by subjecting image data of a series of frames which constitute an image such as a moving image, to a coding process for each macroblock, and carries out a decoding process for the coded image data for each macroblock, to generate decoded image data corresponding to each macroblock. This image decoding apparatus is mounted on a communication device such as a so-called picture phone and an image portable terminal. The coding process includes the inter-frame prediction process using the motion compensation, an orthogonal transform process such as DCT, a quantization process, a variable length coding process and the like. The decoding process includes. the inter-frame prediction process using the motion compensation, an inverse orthogonal transform process such as IDCT, an inverse quantization process, a variable length decoding process and the like.
To be more specific, the image decoding apparatus 100 includes a variable length decoder 102 for variable-length-decoding coded image data 101 of a target macroblock in a processing target frame which is to be processed, to output frequency-converted coefficient data 103 and motion vector data 108 corresponding to the target macroblock, and an inverse frequency converter 104 for inversely frequency-converting the frequency-converted coefficient data 103 to output quantized data 117.
Here, the frequency-converted coefficient data 103 are data which represent the DCT coefficient of the target macroblock, which are obtained by subjecting the image data of the target macroblock to the DCT process in subblock units on the coding side. The motion vector data 108 are data which represent a motion vector indicating the position of the reference region whose pixel value is referred to in the reference frame, with respect to the position of the target macroblock in the processing target frame. The quantized data 117 are data which correspond to data representing a quantized coefficient, which are obtained by quantizing the DCT coefficient on the coding side.
The image decoding apparatus 100 further includes an inverse quantizer 118 for inversely quantizing the quantized data 117 to output differential data 105 corresponding to the target macroblock, and an adder 106 for adding predicted image data 109 which are obtained by the prediction process for decoded image data of the target macroblock and the differential data 105 of the target macroblock, to output decoded image data 107 of the target macroblock.
The differential data 105 of the target macroblock are differential data between local decoded image data of the target macroblock, which are obtained by subjecting the quantized coefficient of the target macroblock to the inverse quantization process and the inverse DCT process on the decoding side, and the predicted image data of the target macroblock, which are obtained by a process for referring to the image data of the reference frame to predicting the local decoded image data.
The image decoding apparatus 100 further includes an image display unit 119 for displaying a decoded image on the basis of the decoded image data 107, a frame memory 112b for temporarily holding the decoded image data 107 which are output from the adder 106 as the image data of the reference frame, and a motion compensator 110 for generating the predicted image data 109 of the target macroblock on the basis of the image data 111 of the reference frame which are stored in the frame memory 112b and the motion vector data 108.
Next, the operation of the image decoding apparatus will be described.
When the coded image data 101 are input to this image decoding apparatus 100, the frequency-converted coefficient data 103 and the motion vector 108 of respective macroblocks are successively output by the variable length decoding process for the input coded image data 101 in the variable length decoder 102.
Then, when the frequency-converted coefficient data 103 are input to the inverse frequency converter 104, the frequency-converted coefficient data 103 are converted into the quantized data 117 by the inverse frequency conversion for each subblock, and the quantized data 117 of the each macroblock are output to the inverse quantizer 118. In the inverse quantizer 118, the quantized data 117 of each macroblock are converted by the inverse quantization process into the differential data 105 of each macroblock, and the differential data 105 are output to the adder 106.
Then, in the adder 106, the predicted image data 109 of the target macroblock which is a target of the decoding process and the differential data 105 of the target macroblock are added, and the decoded image data 107 of the target macroblock are output.
When the decoded image data 107 which are output from the adder 106 are input to the image display unit 119, the image display unit 119 displays the decoded image on the basis of the decoded image data 107.
On the other hand, the decoded image data 107 which are output from the adder 106 are temporarily stored by the frame memory 112b as the image data of the reference frame.
In the motion compensator 110, the predicted image data 109 of the target macroblock are generated on the basis of the image data 111 of the reference frame which are stored in the frame memory 112b and the motion vector data of the target macroblock, and the predicted image data 109 are output to the adder 106.
In P frames, redundant image information is removed from by performing the inter-frame prediction. Accordingly, the amount of codes of coded image data corresponding to P frames is commonly smaller than the amount of codes of coded image data of I frames. Thus, when image information is transmitted via a transmission line having a lower transmission rate, there are cases where the coding of image data is carried out taking only the lead frame in the image as an I frame and all of the following frames as P frames, to increase the coding efficiency.
In cases where this coding is carried out, the technique called intra-refresh is often used to prevent an error due to a difference in the arithmetic precision between the coding side devices and the decoding side devices or a transmission error from affecting subsequent frames. In this technique, a coding process in which a fixed number of macroblocks at predetermined positions in a P frame are taken as intra-macroblocks is carried out with successively changing the position of the macroblock which is taken as the intra-macroblock for each P frame.
FIG. 15 is a diagram for explaining the coding process with the intra-refresh.
In the description below of the coding process with the intra-refresh, a case where for a lead frame F1 of an image, the intra-frame coding process taking this frame F1 as an I frame is performed, and for frames F2 to F25 following the frame F1, the inter-frame coding process taking these frames as P frames is performed is shown as a specific example. Assume here that the image has fixed shape and size:, and that the size of each frame is 8 macroblocks (horizontal direction)xc3x976 macroblocks (vertical direction). In addition, assume that four macroblock are taken as the intra-macroblocks. Further, assume that timings when the decoding process is started for the frames F1xcx9cF25 are time (t=t1)xcx9ctime (t=t25), respectively.
Since the lead frame F1 is an I frame, the intra-frame coding process without using the inter-frame prediction is performed for all macroblocks MB in the frame. For the frames F2xcx9cF25 following the frame F1 the inter-frame coding process using the inter-frame prediction is performed, because these frames are P frames.
Here, the intra-refresh is performed in the coding process for P frames. Initially in the first P frame F2, the first to fourth macroblocks MB1 to MB4 from the left of the first row are processed as the intra-macroblocks. In the next P frame F3, the fifth to eighth macroblocks MB5 to MB8 from the left of the first row are processed as the intra-macroblocks. Further, in the P frame F4, the first to fourth macroblocks MB9 to MB12 from the left of the second row are processed as the intra-macroblocks.
As apparent from the above descriptions, also in the subsequent P frames F5 to F13, four macroblocks are similarly processed as the intra-macroblocks successively. For example, macroblocks MB21 to MB24 in the P frame F7, macroblocks MB25 to MB28 in the P frame F8, and macroblocks MB45 to MB48 in the P frame F13 are processed as the intra-macroblocks.
In the coding process for each P frame, it goes without saying that macroblocks other than the macroblocks as the intra-refresh targets are also processed as the intra-macroblocks when the correlation of intra-frame pixel values is stronger than the correlation of inter-frame pixel values. It is also needless to say that the number of macroblocks in each P frame, which are processed as the intra-macroblocks by the intra-refresh is not limited to four.
When the coding processes for the P frames F2 to F13 have been completed, the macroblocks MB1 to MB48 at the respective macroblock positions in the frames have been processed as the intra-macroblocks at least once. In other words, regions at all macroblock positions in the P frame F14 next to the P frame F13 have been subjected to the inter-frame coding process at least once in the coding processes for the P frames F2 to F13.
Thereafter, for the P frames F14 to F25, in the same manner as those in the P frames F2 to F13, the coding process in which four macroblocks are taken as the intra-macroblocks is performed successively. For example, the macroblocks MB1 to MB4 in the P frame F14, the macroblocks MB5 to MB8 in the P frame F15, and the macroblocks MB45 to MB48 in the P frame F25 are processed as the intra-macroblocks.
When this intra-refresh technique is used, even when a certain P frame has an abnormal macroblock which cannot be decoded properly due to errors or the like, a macroblock in the following P frame subsequent to the certain P frame, which is at the same position as that of the abnormal macroblock is properly decoded on the basis of a frame in which that macroblock is taken as the intra-macroblock. This is because a macroblock which is at the same macroblock position in each P frame is periodically (every 12 frames in the example shown in FIG. 15) subjected to the coding process as the intra-macroblock.
For example, even when the P frame F3 has an abnormal macroblock MB28 (the fourth macroblock from the left of the fourth row) which cannot be properly decoded due to errors or the like, the decoding process is properly performed for a macroblock which is at the same position as that of the abnormal macroblock MB28, on the basis of the frame F8 in which this macroblock is taken as the intra-macroblock.
However, as described above, in cases where coded image data which are obtained by coding image data by the coding method including not only the intra-frame coding process but also the inter-frame coding process are subjected to the decoding process, the inter-frame decoding process is performed for coded image data of P frames in which an already processed frame is used as a reference frame and the pixel values of the reference frame are referred to.
Thus, in the prior art decoding apparatus, when the decoding process is started from a P frame, since pixel values of the reference frame are undefined, pixel values constituting decoded image data are also undefined.
Consequently, when the decoding process is started from a P frame as described above, a decoded image having undefined pixel values is displayed, resulting in a disturbance in a display image.
It is conceivable that this problem that a decoded image having undefined pixel values is displayed may be avoided by not displaying a decoded image before the decoding process for at least one I frame has been completed after the decoding process was started from a P frame. However, when these measures are taken, the delay time from when coded image data are input to the decoding apparatus till a decoded image is displayed is increased.
It is an object of the present invention to provide an image decoding method, an image decoding apparatus, and a data storage medium, which can display a decoded image having pixel values which are determined to predetermined values, successively starting from a frame whose decoding process has been completed, reduce the delay time from the data input, and display the decoded images satisfactorily, even when the decoding process is started from a P frame.
Other objects and advantages of the present invention will become apparent from the detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the spirit and scope of the invention will be apparent to those of skill in the art from the detailed description.
According to a 1st aspect of the present invention, there is provided an image decoding method including a decoding process for decoding coded image data which are obtained by coding image data of each frame for displaying a predetermined image, to generate decoded image data, and a display process for displaying a decoded image on the basis of the decoded image data, and the decoding process includes: an intra-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, without referring to decoded image data of an already processed frame the decoding process of which has been completed; and an inter-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, with referring to decoded image data of an already processed frame the decoding process of which has been completed, and when the decoded image data of the already processed frame as a reference frame which is to be referred to in the decoding of the coded image data of the processing target frame are undefined, the inter-frame decoding process refers to preset image data for displaying a preset image in place of decoded image data of the reference frame. Therefore, even when the decoded image data of the already processed frame as the reference frame are not fixed, the display of a decoded image can be satisfactorily performed on the basis of the decoded image data which are obtained by the inter-frame decoding process for each frame, with suppressing the delay time from the initiation of the decoding of the coded image data.
According to a 2nd aspect of the present invention, in the image decoding method of the 1st aspect, the decoding process comprises: deciding coded image data which are obtained by subjecting image data of a processing target frame which is to be coded, to an intra-frame coding process of carrying out coding without referring to image data of an already processed frame the coding process of which has been completed, by the intra-frame decoding process; and decoding coded image data which are obtained by subjecting image data of a processing target frame which is to be coded, to an inter-frame coding process for carrying out coding with referring to image data of an already processed frame the coding process of which has been completed, by the inter-frame decoding process, and the inter-frame decoding process refers to the preset image data, when a processing target frame which is to be decoded first is a frame which has been subjected to the inter-frame coding process. Therefore, even when the decoding process is started from an inter-frame coded frame which has been subjected to the inter-frame coding process, the display of a decoded image can be satisfactorily performed on the basis of decoded image data which are obtained by the inter-frame decoding process for the inter-frame coded frame, with suppressing the delay time from the initiation of the decoding of the coded image data.
According to a 3rd aspect of the present invention, in the image decoding method of the 1st aspect, an initialization process is carried out for writing the preset image data as initialization data in a storage area of a frame memory which contains the decoded image data of the reference frame, prior to start of the decoding process. Therefore, image data of various kinds of images can be provided for the preset image data which are referred to in the inter-frame decoding process for the processing target frame, in place of the decoded image data of the already processed frame.
According to a 4th aspect of the present invention, in the image decoding method of the 1st aspect, an initialization process is carried out for writing the preset image data as initialization data in a storage area of a frame memory which contains the decoded image data of the reference frame prior to start of the decoding process, even when a processing target frame which is to be decoded first is a frame which has been subjected to the intra-frame-coding process, and when an error is detected in a region of image data of the frame which has been subjected to the intra-frame coding process, pixel values of image data of a region corresponding to the region in which the error is detected, the image data being stored in a storage area of the frame memory, are displayed in the region in which the error is detected. Therefore, when an error occurs in a frame which has been subjected to the intra-frame processing, the error handling process can be commonly performed regardless of whether the frame in which the error occurs is a lead frame or other frames, whereby the size of a program storage memory can be reduced. This is advantageous to devices which require further miniaturization, such as portable terminals.
According to a 5th aspect of the present invention, in the image decoding method of the 1st aspect, when an error is detected in the coded image data of the processing target frame, an initialization process is carried out for writing the preset image data as initialization data in a storage area of a frame memory which contains decoded image data of the reference frame, prior to the decoding of the processing target frame in which the error is detected. Therefore, the preset image data in the frame memory can be displayed in an error area of coded image data in which an error occurs, whereby an image not having undefined pixel values can be displayed as a decoded image corresponding to the processing target frame.
According to a 6th aspect of the present invention, in the image decoding method of the 1st aspect, when an error is detected in the coded image data of the processing target frame, a fatality of the error is judged prior to the decoding of the processing target frame in which the error is detected; when the fatality of the error is higher, an initialization process is carried out for writing the preset image data as initialization data in a storage area of a frame memory which contains the decoded image data of the reference frame; and when the fatality of the error is lower, the initialization process is not carried out. Therefore, the initialization of the frame memory which is performed when an error occurs is performed only in cases when the fatality of the error is higher, whereby the image quality of image data to be displayed can be improved.
According to a 7th aspect of the present invention, in the image decoding method of the 1st aspect, image data including character information are used as the preset image data. Therefore, in a situation where decoded image data of an already processed frame which is referred to in the inter-frame decoding process for the processing target frame include many undefined pixel values, an image including various messages can be displayed as the decoded image.
According to an 8th aspect of the present invention, in the image decoding method of the 1st aspect, an initialization process is carried out for writing the preset image data as initialization data in part of a storage area of a frame memory which contains the decoded image data of the reference frame prior to start of the decoding process, and decoded image data which are stored in the part of the storage area of the frame memory are used as the decoded image data of the reference frame. Therefore, the amount of data which are processed in the initialization process can be reduced.
According to a 9th aspect of the present invention, in the image decoding method of the 8th aspect, the intra-frame coding process and the inter-frame coding process are carried out for the image data of each frame for each unit area in the frame, and a size of an image corresponding to the part of the storage area of the frame memory is the same as a size of the unit area of the coding processes. Therefore, the amount of data which are processed in the initialization process can be minimized.
According to a 10th aspect of the present invention, in the image decoding method of the 1st aspect, image data which are composed of predetermined pixel values are used as the preset image data. Therefore, influences of the preset image data upon decoded image data which are obtained by the inter-frame decoding process, which appear on a decoded image, can be reduced.
According to an 11th aspect of the present invention, there is provided an image decoding method which includes a decoding process for decoding coded image data which are obtained by subjecting image data of a processing target frame which is to be coded, to one of an intra-frame coding process of carrying out coding without referring to image data of an already processed frame which has been coded and an inter-frame coding process of carrying out coding with referring to the image data of the already processed frame, for each unit area of the processing target frame, to generate decoded image data, and a display process for displaying a decoded image on the basis of the decoded image data, and the decoding process includes: an intra-frame decoding process of decoding coded image data of an intra-frame coded frame being composed of only unit areas which have been subjected to the intra-frame coding process, without referring to decoded image data of an already processed frame the decoding process of which has been completed; and an inter-frame decoding process of decoding coded image data of an inter-frame coded frame including an unit area which has been subjected to the inter-frame coding process, with referring to decoded image data of an already processed frame the decoding process of which has been completed, and starts the intra-frame decoding process or the inter-frame decoding process, regardless of whether a lead frame which is to be decoded is the intra-frame coded frame or the inter-frame coded frame, and when the lead frame is the inter-frame coded frame, the display process starts display of a decoded image from a predetermined frame subsequent to the lead frame on the basis of decoded image data thereof. Therefore, the display of a decoded image can be performed, with the delay time from the initiation of the decoding of coded image data being suppressed as well as without excessive disturbances in the decoded image being led.
According to a 12th aspect of the present invention, in the image decoding method of the 11th aspect, when a series of inter-frame coding processes for consecutive N (N is a natural number) frames have been completed, said coding process encodes image data of the respective frames such that all unit areas in a processing target frame become areas which have been subjected to the intra-frame coding process at least once during the series of the inter-frame coding process, and when the lead frame is the inter-frame coded frame, said display process starts display of a decoded image from an N-th frame from the lead frame on the basis of decoded image data thereof. Therefore, the display of a decoded image is performed as soon as the pixel values of the decoded image are fixed to significant values. To be more specific, not only the display of a decoded image having undefined pixel values can be prevented, but also a decoded image of decoded image data not having undefined pixel values can be displayed at a time when the decoded image data have been generated, without waiting for the decoding of coded image data corresponding to an intra-frame coded frame. Further, it is not required to judge whether all macroblocks in the processing target frame have been processed as intra-macroblocks.
According to a 13th aspect of the present invention, in the image decoding method of the 11th aspect, when a series of inter-frame coding processes for a predetermined number of consecutive frames have been completed, said coding process encodes image data of the respective frames such that all unit areas in a processing target frame become areas which have been subjected to the intra-frame coding process at least once during the series of the inter-frame coding processes, and when the lead frame is the inter-frame coded frame, said display process detects a specific inter-frame coded frame which is later than the lead frame, all unit areas of which frame are areas which have been subjected to the intra-frame coding process at least once during the series of the inter-frame coding process, and starts display of a decoded image from the specific inter-frame coded frame on the basis of decoded image data thereof. Therefore, the display of a decoded image is performed as soon as the pixel values of the decoded image are fixed to significant values. That is, with avoiding the display of a decoded image having undefined pixel values, a decoded image of decoded image data not having undefined pixel values can be displayed as soon as the decoded image data are generated.
According to a 14th aspect of the present invention, there is provided an image decoding apparatus which receives coded image data which are obtained by coding image data of each frame for displaying a predetermined image, and decodes the coded image data to generate decoded image data, comprising: a decoding unit for carrying out one of an intra-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, without referring to decoded image data of an already processed frame the decoding process of which has been completed, and an inter-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, with referring to decoded image data of an already processed frame the decoding process of which has been completed; an image display unit for displaying a decoded image on the basis of the decoded image data; a frame memory for temporarily containing decoded image data of an already processed frame which is referred to in the inter-frame decoding process; and an initialization unit for initializing the frame memory in accordance with an initialization control signal which is give from outside. Therefore, even when decoded image data of an already processed frame as the reference frame for the processing target frame are not fixed, the display of a decoded image can be satisfactorily performed on the basis of decoded image data which are obtained by the inter-frame decoding process for the processing target frame, with the delay time from the input timing of the coded image data being suppressed.
According to a 15th aspect of the present invention, in the image decoding apparatus of the 14th aspect, the initialization control signal is given from outside, when the decoding process is started or when an error is detected in the coded image data. Therefore, the preset image data in the frame memory can be displayed in an error area of the coded image data in which an error occurs, whereby an image not having undefined pixel values can be displayed as a decoded image corresponding to the processing target frame.
According to a 16th aspect of the present invention, in the image decoding apparatus of the 14th aspect, the initialization control signal is given from outside, when the decoding process is started or when an error is detected in the coded image data and a fatality of the detected error is judged higher. Therefore, the initialization of the frame memory which is performed when an error occurs is performed only in cases where the fatality of the error is higher, whereby the image quality of the image data to be displayed can be improved.
According to a 17th aspect of the present invention, the image decoding apparatus of the 14th aspect comprises: an initialization control unit for deciding, on the basis of the input timing of the coded image data, a decoding start timing when the decoding process of the coded image data is to be started, and outputting an initialization control signal to the initialization unit prior to the decoding start timing. Therefore, even when the decoding process is started from an inter-frame coded frame which has been subjected to the inter-frame coding process, the display of a decoded image can be satisfactorily performed on the basis of decoded image data which are obtained by the inter-frame decoding process for the inter-frame coded frame, with the delay time from the input timing of the coded image data being suppressed. Further, since the initialization control signal is generated inside in the apparatus, the interface with the external device can be simplified.
According to an 18th aspect of the present invention, in the image decoding apparatus of the 17th aspect, the initialization control unit detects an error in the coded image data, decides a decoding timing of the coded image data in which the error is detected on the basis of a timing of occurrence of the error, and outputs the initialization control signal to the initialization control unit prior to the decoding timing of the coded image data in which the error is detected. Therefore, the display of a decoded image can be satisfactorily performed on the basis of decoded image data which are obtained by the inter-frame decoding process for the inter-frame coded frame, with the delay time from the input timing of the coded image data being suppressed. Further, when an error is detected in image data of the processing target frame, the display of decoded image data after the error is processed can be satisfactorily performed, with the delay time from the timing of error occurrence being suppressed.
According to a 19th aspect of the present invention, in the image decoding apparatus of the 17th aspect, the initialization control unit detects an error in the coded image data, judges a fatality of the error, and decides a decoding timing of the coded image data in which the error is detected on the basis of a timing of occurrence of the error, and when the fatality of the error is higher, outputs the initialization control signal to the initialization unit prior to the decoding timing of the coded image data in which the error is detected, and when the fatality of the error is lower, does not output the initialization control signal to the initialization unit. Therefore, the initialization of the frame memory which is performed when an error occurs is performed only in cases where the fatality of the error is higher, whereby the image quality of image data to be displayed can be improved.
According to a 20th aspect of the present invention, there is provided an image decoding apparatus which decodes coded image data obtained by subjecting image data of a processing target frame which is to be coded, to one of an intra-frame coding process which does not refer to image data of an already processed frame which has been coded, and an inter-frame coding process which refers to the image data of the already processed frame, for each unit area of the processing target frame, to generate decoded image data, comprising: a decoding unit for decoding coded image data of an intra-frame coded frame being composed of only unit areas which have been subjected to the intra-frame coding process, without referring to decoded image data of an already processed frame the decoding process of which has been completed, as well as decoding coded image data of an inter-frame coded frame including a unit area which has been subjected to the inter-frame coding process, with referring to decoded image data of an already processed frame the decoding process of which has been completed, to output the decoded image data; an image display unit for displaying a decoded image on the basis of the decoded image data which are output from the decoding unit; a switch which is provided between the decoding unit and the image display unit; and a switch control unit for deciding, on the basis of the coded image data, a display start timing when display of a decoded image of each frame is started, and controlling the switch to open or close on the basis of the display start timing. Therefore, the display of a decoded image on the basis of decoded image data of each frame can be performed with the delay time from the input timing of the coded image data being suppressed as well as without excessive disturbances in the decoded image being led. To be more specific, the display of a decoded image can be started after many or all macroblocks in a frame which has been decoded are processed as intra-macroblocks. Accordingly, even when coded image data of an intra-frame coded frame are not input, a correct decoded image or an image which is like the correct one can be displayed on the basis of decoded image data which are obtained by the decoding process of coded image data of the inter-frame coded frame, with little delay from the input of the coded image data.
According to a 21st aspect of the present invention, there is provided a data storage medium which contains an image decoding program for implementing a decoding process for decoding coded image data which are obtained by coding image data of each frame for displaying a predetermined image, to generate decoded image data, and a display process for displaying a decoded image on the basis of the decoded image data, by a computer, and the decoding process includes: an intra-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, without referring to decoded image data of an already processed frame the decoding process of which has been completed; and an inter-frame decoding process of decoding coded image data of a processing target frame which is to be decoded, with referring to decoded image data of an already processed frame the decoding process of which has been completed, and when decoded image data of an already processed frame as a reference frame which is referred to when the coded image data of the processing target frame are decoded are undefined, the inter-frame decoding process refers to preset image data for displaying a preset image, in place of the decoded image data of the reference frame. Therefore, a decoding control process for satisfactorily performing the display of a decoded image on the basis of decoded image data which are obtained by the inter-frame decoding process for each frame even when decoded image data of a processing target frame as the reference frame are not fixed, with the delay time from the initiation of decoding of the coded image data being suppressed, can be realized by software.
According to a 22nd aspect of the present invention, there is provided a data storage medium which contains an image decoding program for implementing a decoding process for decoding coded image data which are obtained by subjecting image data of a processing target frame which is to be coded, to one of an intra-frame coding process of carrying out coding without referring to image data of an already processed frame which have been coded, and an inter-frame coding process of carrying out coding with referring to the image data of the already processed frame, for each unit area of the processing target frame, to generate decoded image data, and a display process for displaying a decoded image on the basis of the decoded image data, by a computer, and the decoding process includes: an intra-frame decoding process of decoding coded image data of an intra-frame coded frame being composed of only unit areas which have been subjected to the intra-frame coding process, without referring to decoded image data of an already processed frame the decoding process of which has been completed; and an inter-frame decoding process of decoding coded image data of an inter-frame coded frame including a unit area which has been subjected to the inter-frame coding process, with referring to decoded image data of an already processed frame the decoding process of which has been completed, starts the intra-frame decoding process or the inter-frame decoding process, regardless of whether a lead frame which is to be decoded is the intra-frame coded frame or the inter-frame coded frame, and when the lead frame is the inter-frame coded frame, the display process starts display of a decoded image from a predetermined frame which is later than the lead frame on the basis of decoded image data thereof. Therefore, a display control process for performing the display of a decoded image with the delay time from the initiation of the decoding of coded image data being suppressed as well as without excessive disturbances in a decoded image being led can be realized by software.